import {express} from '@/utils/express/express.js'
import isToken from '@/utils/token/token.js'

export const get_user_info = () => {
  return express.get('user/getinfo',{
    headers:{
        'Authorization':isToken()
    }
  })
}

export const get_user_profile = () => {
  return express.get('user/getProfile',{
    headers:{
        'Authorization':isToken()
    }
  })
}


export const change_user_profile = (data) => {
  return express.post('user/upload',data,{
    headers:{
        'Authorization': isToken(),
        "Content-Type": "multipart/form-data "
    }
  })
}

export const change_user_info = (data) => {
  return express.post('user/change',data,{
    headers:{
        'Authorization': isToken(),
    }
  })
}

export const lunchvideo = (data) => {
  return express.post('user/lunchvideo',data,{
    headers:{
        'Authorization': isToken(),
        "Content-Type": "multipart/form-data "
    }
  })
}

export const togetherIsFan = (data) => {
  return express.post('user/isFan',data,{
    headers:{
        'Authorization': isToken(),
    }
  })
}

export const ortherGetfriend = (data) => {
  return express.post('api/getfriends',data)
}

export const get_other_info = (data) => {
  return express.get('api/getinfo',{
    params:{up: data},
    headers:{
        'Authorization':isToken()
    }
  })
}


export const get_user_info_with_token = (data) => {
  return express.get('user/getinfo',{
    params:{up: data},
    headers:{
        'Authorization':isToken()
    }
  })
}

export const get_orther_friend_token = (data) => {
  return express.post('user/getfriendsWithToken', data, {
    headers:{
        'Authorization': isToken()
    }
  })
}